#ifndef __MENU_HANDLE_H
#define __MENU_HANDLE_H

#include <stdint.h>

#define USB_PORT_NUM 4

typedef enum
{
    MENU_IDX_HOME = -1,
    MENU_IDX_MENU1,
} menu_idx_t;

typedef struct {
    float current;
    float power;
    uint8_t ovc_state;
} port_state_t;

typedef struct {
    float vref_value;
    float vin_value;
    float vbus_value;
    
    port_state_t port_state[USB_PORT_NUM];
    
    float all_current;
    float all_power;
    float all_energy;
    float chip_temp;
    uint8_t ovp_flag;
} hub_state_t;

extern hub_state_t hub_state;
extern menu_idx_t CURR_MENU;

void task_display_handle(void);
void display_about_sw(void);
void menu_key_handle(void);

#endif // __MENU_HANDLE_H
